package base.common;

import com.common.SqlType;
import com.common.sqlinterface.SqlParamInterface;
import com.utils.VerifyUtil;

import java.util.Map;

/**
 * @author tim
 * @version 1.0
 * @date 2022/5/7 16:32
 */
public class SqlParam implements SqlParamInterface {
    @Override
    public Map<String, Object> getSysFunction(SqlType sqlType, Map<String, Object> map) {
        if(sqlType.name().equals("INSERT")){
            map.put("cTime", VerifyUtil.getDate());
            map.put("upTime",VerifyUtil.getDate());
        }else if(sqlType.name().equals("UPDATE")){
            map.put("upTime",VerifyUtil.getDate());
        }
        return map;
    }
}
